/**
 * Copyright &copy; 2012-2016 <a href="https://github.com/thinkgem/jeesite">JeeSite</a> All rights reserved.
 */
package com.msk.wlhy.service;


import com.msk.sys.service.CrudService;
import com.msk.wlhy.domain.HtCompany;
import com.msk.wlhy.mapper.HtCompanyDao;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;
import java.util.Map;

/**
 * 企业信息维护Service
 * @author zkp
 * @version 2018-06-06
 */
@Service
@Transactional(readOnly = true)
public class HtCompanyService extends CrudService<HtCompanyDao, HtCompany> {


	
	public HtCompany get(String id) {
		HtCompany htCompany = super.get(id);
		return htCompany;
	}
	
	public List<HtCompany> findList(HtCompany htCompany) {
		return super.findList(htCompany);
	}

	public List<HtCompany> findAllReceiverList(HtCompany htCompany) {
		return dao.findAllReceiverList(htCompany);
	}

	@Transactional(readOnly = false)
	public void delete(HtCompany htCompany) {
		super.delete(htCompany);
	}
	
	@Transactional(readOnly = false)
	public int deleteIds(String[] ids) {
		int result = 0;
		for (String id : ids) {
			super.delete(new HtCompany(id));
			result ++;
		}
		return result;
	}
	@Transactional(readOnly = false)
	public int updateData(HtCompany htCompany){
		return dao.updateData(htCompany);
	}

	public HtCompany getByName(HtCompany htCompany) {
		return dao.getByName(htCompany);
	}

	public List<HtCompany> findByUnifiedSocialCreditCode(String unifiedSocialCreditCode){
		return dao.findByUnifiedSocialCreditCode(unifiedSocialCreditCode);
	}

	public  List<HtCompany> findListNew(HtCompany htCompany){
		return dao.findListNew(htCompany);
	}

	/**
	 * @Description 查询收货方列表
	 * @Author wlxiang
	 * @Date 19:00 2023/6/9
	 * @Param
	 * @param affiliatedPersonId
	 * @param consigneeName
	 * @return java.util.List<java.util.Map<java.lang.String,java.lang.Object>>
	 **/
	public List<Map<String,Object>> selectRecipientList(String affiliatedPersonId,String consigneeName){
		return dao.selectRecipientList(affiliatedPersonId,consigneeName);
	};

	/**
	 * @Description 编辑我的收货方
	 * @Author wlxiang
	 * @Date 14:44 2023/6/12
	 * @Param
	 * @param params
	 * @return int
	 **/
	@Transactional(readOnly = false)
	public int updateRecipient(Map<String,Object> params){
		return dao.updateRecipient(params);
	};
}